package com.frame.config.dubbo;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.alibaba.dubbo.config.spring.ReferenceBean;
import com.frame.dubbo.DubboBaseConfig;
import com.frame.service.common.UserCommonService;

/**
 * 服务提供
 * @author Flying
 *
 */
@Configuration
public class ReferenceConsumerConfig extends DubboBaseConfig {

    @Bean
    public ReferenceBean<UserCommonService> sysmsService() {
        ReferenceBean<UserCommonService> ref = new ReferenceBean<>();
        ref.setVersion(version);
        ref.setInterface(UserCommonService.class);
        ref.setTimeout(5000);
        ref.setRetries(3);
        ref.setCheck(false);
        return ref;
    }
}